<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="libs/layui/css/layui.css" />
		<script src="libs/layui/layui.js" type="text/javascript" charset="utf-8 "></script>
	</head>

	<body>
		<div class="layui-form">
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">选择框</label>
					<div class="layui-input-block">
						<select name="city" lay-verify="required" lay-search>
							<option value=""></option>
							<option value="0">北京</option>
							<option value="1">上海</option>
							<option value="2">广州</option>
							<option value="3">深圳</option>
							<option value="4">杭州</option>
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">选择框</label>
					<div class="layui-input-block">
						<select name="city" lay-verify="required" lay-search>
							<option value=""></option>
							<option value="0">北京</option>
							<option value="1">上海</option>
							<option value="2">广州</option>
							<option value="3">深圳</option>
							<option value="4">杭州</option>
						</select>
					</div>
				</div>
			</div>
			<a href="javascript:;" class="layui-btn" lay-submit lay-filter="formDemo">1</a>
		</div>
		<script>
			layui.use('form', function() {
				var form = layui.form();
				//各种基于事件的操作，下面会有进一步介绍
				form.on('submit(formDemo)', function(data) {
//					console.log(data)
					layer.msg("asdads"+JSON.stringify(data.field));
					return false;
				})
			});
		</script>
	</body>

</html>